﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace BSE.Windows.Test
{
    public partial class YaopinForm : Form
    {
        public Yaopin yaopin = null;

        public YaopinForm()
        {
            InitializeComponent();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (yaopin == null)
                yaopin = new Yaopin();

            yaopin.YaopinCode = textBoxCode.Text;
            yaopin.YaopinName = textBoxName.Text;
            yaopin.YaopinGuige = textBoxType.Text;
            yaopin.YaopinDanwei = textBoxUnit.Text;
        }

        private void YaopinForm_Load(object sender, EventArgs e)
        {
            if (yaopin != null)
            {
                textBoxCode.Text = yaopin.YaopinCode;
                textBoxName.Text = yaopin.YaopinName;
                textBoxType.Text = yaopin.YaopinGuige;
                textBoxUnit.Text = yaopin.YaopinDanwei;
            }
        }
    }
}
